package com.jh.user.controller;

import com.jh.user.pojo.ShopRegister;

import java.text.SimpleDateFormat;

/**
 * @author Yichuan
 * @version 1.0
 */
public class ShopDTO {

    private String shopId;

    private String shopName;

    private String shopShortName;

    private String shopHeadPic;

    private String firstPic;

    private String shopStartTime;

    // 0未审核1 审核中 2后台审核失败  3即付审核中 4即付审核失败 5成功
    private int status;

    public ShopDTO() {
    }

    public String getShopStartTime() {
        return shopStartTime;
    }

    public void setShopStartTime(String shopStartTime) {
        this.shopStartTime = shopStartTime;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopShortName() {
        return shopShortName;
    }

    public void setShopShortName(String shopShortName) {
        this.shopShortName = shopShortName;
    }

    public String getShopHeadPic() {
        return shopHeadPic;
    }

    public void setShopHeadPic(String shopHeadPic) {
        this.shopHeadPic = shopHeadPic;
    }

    public String getFirstPic() {
        return firstPic;
    }

    public void setFirstPic(String firstPic) {
        this.firstPic = firstPic;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public static ShopDTO dto(ShopRegister shopRegister) {
        if (shopRegister == null) {
            return null;
        }

        ShopDTO dto = new ShopDTO();
        dto.setShopStartTime(shopRegister.getShopStartTime());
        dto.setShopId(shopRegister.getShopId());
        dto.setShopName(shopRegister.getShopName());
        dto.setShopShortName(shopRegister.getShopShortName());
//        dto.setShopHeadPic(shopRegister.getShopHeadPic());
//        dto.setFirstPic(shopRegister.getFirstPic());
        dto.setStatus(shopRegister.getStatus());
        return dto;
    }
}
